#ifndef AMVIRTENTITY_H
#define AMVIRTENTITY_H

/**
 * An abstract class that should be implemented
 * by anything that can be transformed and rendered
 */
class AMVirtualEntity
{
public:
    AMVirtualEntity();

    // Rotate the entity by (deg) around the axis <x, y, z>
    void rotate(float deg, float x, float y, float z);

    // Translate the entity in direction <x, y, x> by ||<x, y, z>||
    void translate(float x, float y, float z);

    // Scale the object
    void scale(float x, float y, float z);

    // Apply transformations and then call renderEntity
    void render();

protected:
    // Where actual rendering is done
    virtual void renderEnity() = 0;

private:
    /**
      * These arrays are aligned on 16 bit boundries
      * inorder to use SSE instructions
      */

    // rotation matrix
    __attribute__((aligned(16))) float * m_RotMatrix;

    // translation matrix
    __attribute__((aligned(16))) float * m_TrnMatrix;

    // scale matrix
    __attribute__((aligned(16))) float * m_SclMatrix;
};

#endif // AMVIRTENTITY_H
